package com.kk.demo.result;

/**
 * the class of springboot-prototype-global-exception
 *
 * <p>
 * .
 *
 * @author little_lunatic
 * @date 2023-02-08
 */
public enum ComResultCodeEnum implements ResultCode {

    /** success. */
    SUCCESS("0", "success"),
    FAILED("500", "failed"),

    ;

    /** The code. */
    private String code;

    /** The msg. */
    private String msg;

    /**
     * Construction method.
     *
     * @param code the code
     * @param msg the msg
     */
    ComResultCodeEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    /**
     * Get code.
     *
     * @return the string
     */
    @Override
    public String code() {
        return this.code;
    }

    /**
     * Get msg.
     *
     * @return the string
     */
    @Override
    public String msg() {
        return this.msg;
    }

    /**
     * Override toString.
     *
     * @return the string
     */
    @Override
    public String toString() {
        return name();
    }

}
